<% unless structure.nil?%>
	<%= swf_object(structure.slider.url, "flash_slide_show", '534', '250', "9.0.0",  {:wmode=>"transparent", :quality=>"high"}, {:url=>structure.slider.url}, true) unless structure.slider.blank?%>
<% end -%>

<%#= image_tag @structure.photo.url(:structure), :alt=>@structure.title, :id=>'flash'%>

<%# unless structure.nil? %>
<% if false %>
	<% content_for :head do %>
	<style>
	#carousel-wrapper {
		  width: 500px;
		  height: 250px;
		  overflow: hidden;
	}
	#carousel-content {
		  width: 2500px;
	}
	#carousel-content .slide {
		  float: left;
		  width: 500px;
		  height: 237px;
	}
	</style>
	<% end -%>

		<div id="carousel-wrapper">
			<div id="carousel-content">
				<% structure.photos.each do |photo|%>
					<div class="slide">
						<%= image_tag photo.url(:structure), :alt=>structure.title %>
					</div>
				<% end -%>
			</div>
		</div>

	<script type="text/javascript">
		 new Carousel('carousel-wrapper', $('carousel-content').select('div.slide'), null, {duration: 1.2, effect: 'fade', auto: true, frequency: 5});
	</script>
<% end -%>
